package cn.gson.tj_springboot.model.pojos;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "problem_table", schema = "tjcrm", catalog = "")
public class ProblemTable {
    private int problemtableId;
    private String problemContent;
    private String problemKind;
    private Integer problemState;

    @Id
    @Column(name = "problemtable_id", nullable = false)
    public int getProblemtableId() {
        return problemtableId;
    }

    public void setProblemtableId(int problemtableId) {
        this.problemtableId = problemtableId;
    }

    @Basic
    @Column(name = "problem_content", nullable = true, length = 255)
    public String getProblemContent() {
        return problemContent;
    }

    public void setProblemContent(String problemContent) {
        this.problemContent = problemContent;
    }

    @Basic
    @Column(name = "problem_kind", nullable = true, length = 255)
    public String getProblemKind() {
        return problemKind;
    }

    public void setProblemKind(String problemKind) {
        this.problemKind = problemKind;
    }

    @Basic
    @Column(name = "problem_state", nullable = true, precision = 0)
    public Integer getProblemState() {
        return problemState;
    }

    public void setProblemState(Integer problemState) {
        this.problemState = problemState;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ProblemTable that = (ProblemTable) o;
        return problemtableId == that.problemtableId &&
                Objects.equals(problemContent, that.problemContent) &&
                Objects.equals(problemKind, that.problemKind) &&
                Objects.equals(problemState, that.problemState);
    }

    @Override
    public int hashCode() {
        return Objects.hash(problemtableId, problemContent, problemKind, problemState);
    }
}
